package com.obrempon.credit.market.sdk.device.http

import com.obrempon.credit.market.sdk.device.ObremponDeviceSycBuilder


object ObremponDeviceUrlHelper {

    fun combineUrl(): String {
        if (ObremponDeviceSycBuilder.host.isBlank() or ObremponDeviceSycBuilder.zone.isBlank() or ObremponDeviceSycBuilder.pathCommon.isBlank()) {
            return ""
        }

        val zone = ObremponDeviceSycBuilder.zone
        ObremponDeviceSycBuilder.zone = zone.replace("/", "")

        val pathCommon = ObremponDeviceSycBuilder.pathCommon
        ObremponDeviceSycBuilder.pathCommon = pathCommon.replace("/", "")

//        return ObremponDeviceSycBuilder.host + "/" + ObremponDeviceSycBuilder.zone + "/" + ObremponDeviceSycBuilder.pathCommon
        return "/" + ObremponDeviceSycBuilder.zone + "/" + ObremponDeviceSycBuilder.pathCommon
    }
}